public class MileageExtension {
	private final Mileage_second__c mileageObj;

	public MileageExtension(ApexPages.StandardController controller) {
		this.mileageObj = (Mileage_second__c)controller.getRecord();
	}
	
	public Mileage_second__c[] getTodayMileageRecords(){
		String createdbyId = UserInfo.getUserId();
		Mileage_second__c[] mileageList =
			[select name, miles__c
			 from   Mileage_second__c
			 where  Date__c = TODAY
			 and    createdbyid = :createdbyId];
		return mileageList;
	}
}